// scss/RosWebConsole.module.scss
:root {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --danger-color: #e74c3c;
  --dark-color: #2c3e50;
  --light-color: #f8f9fa;
}

.rosConsole {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--light-color);
  padding: 20px;

  .statusBadge {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;

    &.connected {
      background-color: var(--secondary-color);
      color: white;
    }

    &.disconnected {
      background-color: var(--danger-color);
      color: white;
    }

    &.connecting {
      background-color: #f39c12;
      color: white;
    }
  }

  .card {
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: none;

    .cardHeader {
      background-color: var(--dark-color);
      color: white;
      border-radius: 10px 10px 0 0 !important;
      padding: 12px 20px;
      font-weight: 600;
    }
  }

  .presetBtn {
    margin-bottom: 5px;
    width: 100%;
  }

  .colorPreview {
    width: 20px;
    height: 20px;
    display: inline-block;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
  }

  .jsonEditor {
    font-family: monospace;
    min-height: 150px;
  }

  .logEntry {
    font-family: monospace;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    margin-bottom: 0.25rem;
    border-radius: 0.25rem;

    &.logInfo {
      background-color: #e9f7fe;
      color: #31708f;
    }

    &.logError {
      background-color: #fdecea;
      color: #a94442;
    }

    &.logSuccess {
      background-color: #eaf7ea;
      color: #3c763d;
    }
  }

  .topicCard {
    transition: all 0.3s ease;

    &:hover {
      transform: translateY(-5px);
      box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }
  }

  .chartContainer {
    position: relative;
    height: 200px;
    width: 100%;
  }

  .overflowY {
    max-height: 300px;
    overflow-y: auto;
  }

  .btnPurple {
    background-color: #800080;
    border-color: #800080;
    color: white;

    &:hover {
      background-color: #6a006a;
      border-color: #6a006a;
    }
  }

  .btnWarning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: black;

    &:hover {
      background-color: #e0a800;
      border-color: #e0a800;
    }
  }

  .btnInfo {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;

    &:hover {
      background-color: #138496;
      border-color: #138496;
    }
  }
}